﻿using System.Collections.Generic;
using PetaPoco;
using WebSocketDemo.Entity;

namespace WebSocketDemo.Tools
{
    public class SqlService
    {
        private Database _db;
        public SqlService()
        {
            _db = new Database("ConnectionString");
        }
        
        public List<EMessage> GetMessages()
        {
            var sql = "where IsDelete = 0";

            return _db.Fetch<EMessage>(sql);
        }
    }
}
